import { http } from '../http.config'

export const chatApi =  {
    //考核列表
    getChatMessages: (data)=> {
        const config = {
            timeout: 0,
            headers: {
                'Content-Type': 'application/json',
                'Authorization': 'Bearer app-aK9ohWBEtIRCGu7wvIFQiE9b'
            }
        }
        return http.post('http://alone.hndfdz.cn:7799/v1/chat-messages',data,config)
    },
    //查询历史记录
    getDialogList: (data)=> {
        return http.get('http://alone.hndfdz.cn:7799/records',data)
    },
    //历史记录详情
    getRecordsDetail: (id)=> {
        return http.get(`http://alone.hndfdz.cn:7799/records/${id}`)
    },
    //创建历史记录
    createRecords: (data)=> {
        return http.post('http://alone.hndfdz.cn:7799/records',data)
    },
    //删除历史记录
    deleteRecords: (id, params)=> {
        return http.delete(`http://alone.hndfdz.cn:7799/records/${id}`, params)
    },
    //更新历史记录
    updateRecords: (id, params)=> {
        return http.put(`http://alone.hndfdz.cn:7799/records/${id}`, params)
    },
    //考核任务记录
    getTaskRecords: (data)=> {
        return http.get('/education/student/paper/records',data)
    },
    //AI--考核任务记录-详情
    getTaskRecordsDetail: (test_id)=> {
        return http.get(`/education/student/paper/records/${test_id}`)
    },


    //查询考核记录对话列表
    getTaskRecordsDialog: (data)=> {
        return http.get('http://alone.hndfdz.cn:7799/assessment_records',data)
    },

    //创建考核任务会话记录
    createTaskRecords: (data)=> {
        return http.post('http://alone.hndfdz.cn:7799/assessment_records',data)
    },
    //更新考核任务会话记录
    updateTaskRecords: (id, params)=> {
        return http.put(`http://alone.hndfdz.cn:7799/assessment_records/${id}`, params)
    },
    //考核记录会话详情
    getTaskRecordsDialogDetail: (id)=> {
        return http.get(`http://alone.hndfdz.cn:7799/assessment_records/${id}`)
    }
}